package com.irssproject.app.utils;

import java.util.Calendar;

public class DataUtils {
	
	
	public static String getDataAvui (String format)
	{
		if (format.equals("dd/mm/aaaa"))
		{
			Calendar ara = Calendar.getInstance();
			int mes = ara.get(Calendar.MONTH);
			mes = mes+1;
			return ara.get(Calendar.DATE)+"/"+mes+"/"+ara.get(Calendar.YEAR);

		}
		else if (format.equals("dd/mm/aa"))
		{
			Calendar ara = Calendar.getInstance();
			int mes = ara.get(Calendar.MONTH);
			mes = mes+1;
			String any = ""+ara.get(Calendar.YEAR);
			any = any.substring(2);
			return ara.get(Calendar.DATE)+"/"+mes+"/"+any;

		}
		
		else return "";

		
	}

}
